package com.ado.abyss.core.service;

import com.ado.abyss.core.dal.model.SysRole;
import com.ado.abyss.core.dal.model.SysRoleMenu;
import com.ado.abyss.core.params.page.PageRequest;
import com.github.pagehelper.PageInfo;

import java.util.Collection;
import java.util.List;

/**
 * @author adonais
 * @date 2020/7/10
 * @description SysRoleService
 **/
public interface SysRoleService {

    /**
     *
     * @param records
     * @return
     */
    boolean saveRoleMenus(List<SysRoleMenu> records);

    /**
     *
     * @param roleId
     * @return
     */
    SysRole selectByPrimaryKey(Long roleId);

    List<SysRoleMenu> findRoleMenus(Long roleId);

    /**
     *
     * @return
     */
    List<SysRoleMenu> findAll();

    /**
     *
     * @param pageRequest
     * @return
     */
    PageInfo<SysRole> findPage(PageRequest pageRequest);

    /**
     *
     * @param records
     * @return
     */
    boolean delete(List<SysRole> records);

    /**
     *
     * @param record
     * @return
     */
    boolean save(SysRole record);

    /**
     *
     * @param id
     * @return
     */
    SysRole findById(Long id);

    /**
     *
     * @param name
     * @return
     */
    SysRole findByName(String name);
}
